﻿<Page x:Class="AgileToDo.PageLogin"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:AgileToDo="clr-namespace:AgileToDo"
      xmlns:Helper="clr-namespace:AgileToDo.Common" mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
             DataContext="{StaticResource ResourceKey=pageLoginVM}"
	Title="PageLogin" Loaded="Page_Loaded" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height=".4*" />
            <RowDefinition Height=".25*" />
            <RowDefinition Height=".35*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
     
        <TextBlock Text="AgileToDo" Grid.Row="0" Grid.Column="0" FontSize="56" Foreground="White"
                   TextAlignment="Center" VerticalAlignment="Center"/>
        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Height="66"  VerticalAlignment="Top" HorizontalAlignment="Center">
            <StackPanel Orientation="Vertical" >
                <TextBlock Text="使用有道笔记登陆" HorizontalAlignment="Left" Foreground="White" Opacity=".6"  Margin="2,0,0,0"/>
                <TextBox x:Name="txtUserName"  Width="200" Margin="2" Text="{Binding UserName, Mode= TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                <PasswordBox x:Name="txtPassword" Width="200" Margin="2" Helper:PasswordBoxHelper.Attach="True" Helper:PasswordBoxHelper.Password="{Binding Path=Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  />
            </StackPanel>
            <Image Height="40" Source="image\go.png" Width="40" Margin="5" 
                   MouseLeftButtonDown="Image_MouseLeftButtonDown" 
               VerticalAlignment="Bottom" >
                <Image.Triggers>
                    <EventTrigger RoutedEvent="Image.MouseEnter">
                        <BeginStoryboard Storyboard="{StaticResource ResourceKey=sbImageIn}"/>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="Image.MouseLeave">
                        <BeginStoryboard Storyboard="{StaticResource ResourceKey=sbImageOut}"/>
                    </EventTrigger>
                </Image.Triggers>
            </Image>
        </StackPanel>
        <AgileToDo:UProgressBar  x:Name="progressBar" Grid.Row="3" Grid.Column="0" VerticalAlignment="Top" />
    </Grid>

      

</Page>
